import java.util.Scanner;

public class demo1 {
    public static void main(String[] args) {
        int a = 1;
        int b = 2;
        System.out.println(a==1&&b==2);
        System.out.println(a<1&&b<2);
        System.out.println(a==1&&b>2);
        System.out.println(a>1&&b==2);

        System.out.println(a==1||b==2);
        System.out.println(a<1||b<2);
        System.out.println(a==1||b>2);
        System.out.println(a>1||b==2);


        /*
        int c = 10;
        System.out.println(!c);//!布尔表达式
         */
        System.out.println(!false);

        int n = -1;
        System.out.println(n>>1);
        System.out.println(n>>>1);

        int a1 = 10;
        int a2 = 20;
        int max = a1>a2?a1:a2;
        System.out.println(max);

        boolean flag = true == true?true:true==false?true:false;
        System.out.println(flag);

        System.out.println("输入数字:");
        Scanner sc = new Scanner(System.in);
        int g = sc.nextInt();
        if(g%2==0){
            System.out.println("是偶数");
        }else{
            System.out.println("是奇数");
        }

        double x =2.0;
        int y =4;
        x /= ++y;
        System.out.println(x);
    }


}
